:root {
  --btn-default-border: var(--primary-300);
  --btn-default-hover: var(--tertiary-800);
  --d-button-border-radius: 6px;
  --btn-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
  --d-input-border-radius: 6px;
  --ant-radius: 6px;
  --d-border-radius: var(--ant-radius);
  --menu-box-shadow: 0 6px 16px 0 rgb(0 0 0 / 8%),
    0 3px 6px -4px rgb(0 0 0 / 12%), 0 9px 28px 8px rgb(0 0 0 / 5%);
  --small-shadow: 0 3px 8px 0 rgb(0, 0, 0, 0.08);
  --float-btn-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08),
    0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, segoe ui, Roboto,
    helvetica neue, Arial, noto sans, sans-serif;
}

@mixin transition-300 {
  transition: all 0.3s;
}

/* 全局 按钮 Global button */
.docker-manager .btn,
.btn-default,
.btn-large,
.btn-small,
.btn-primary {
  border: 1px solid var(--btn-default-border);
  box-shadow: var(--btn-box-shadow);
}

@mixin make-btn-border-and-d-icon(
  $border-color: 0,
  $bg-color: 0,
  $text-color: 0
) {
  @if $border-color != 0 {
    border: 1px solid $border-color;
    box-shadow: var(--btn-box-shadow);
  }
  @if $bg-color != 0 {
    background: $bg-color;
  }
  @if $text-color != 0 {
    color: $text-color;
  }
  .d-icon {
    @if $text-color != 0 {
      color: $text-color;
    }
  }
}

@mixin make-btn(
  $v-border-color: 0,
  $no-shadow: 0,
  $v-bg-color: 0,
  $v-text-color: 0,
  $v-border-color-hover: 0,
  $v-bg-color-hover: 0,
  $v-text-color-hover: 0,
  $v-border-color-active: 0
) {
  @include transition-300();
  .d-icon {
    @include transition-300();
  }

  @if $v-border-color != 0 {
    border: 1px solid $v-border-color;
    @if $no-shadow == 0 {
      box-shadow: var(--btn-box-shadow);
    }
  }
  @if $v-text-color != 0 {
    color: $v-text-color;
  }
  @if $v-bg-color != 0 {
    background-color: $v-bg-color;
  }

  .discourse-no-touch &:hover,
  .discourse-no-touch &.btn-hover,
  &:focus {
    @include make-btn-border-and-d-icon(
      $v-border-color-hover,
      $v-bg-color-hover,
      $v-text-color-hover
    );
  }
  &:active,
  &.btn-active {
    @include make-btn-border-and-d-icon(
      $v-border-color-active,
      $v-bg-color,
      $v-text-color
    );
  }
  .disabled,
  [disabled] {
    opacity: 0.6;
    @include make-btn-border-and-d-icon(
      $v-border-color,
      $v-bg-color,
      $v-text-color
    );
    &:hover,
    &:active,
    &.btn-hover,
    &.btn-active {
      background: transparent;
      @include make-btn-border-and-d-icon(
        $v-border-color,
        $v-bg-color,
        $v-text-color
      );
    }
  }
}

.btn {
  @include make-btn(
    $v-border-color: 0,
    $no-shadow: 0,
    $v-bg-color: var(--secondary),
    $v-text-color: var(--primary-high),
    $v-border-color-hover: var(--tertiary-900),
    $v-bg-color-hover: var(--secondary),
    $v-text-color-hover: var(--btn-default-hover),
    $v-border-color-active: var(--primary-600)
  );
  .discourse-no-touch &:active {
    scale: 0.95;
  }
}
.btn-flat {
  @include make-btn($no-shadow: 1, $v-border-color: transparent);
  box-shadow: none;
}
.btn-transparent {
  @include make-btn(
    $v-text-color: var(--primary-high),
    $v-text-color-hover: var(--primary)
  );
}
.btn-primary {
  @include make-btn(
    $v-border-color: transparent,
    $v-bg-color: var(--tertiary),
    $v-text-color: var(--secondary),
    $v-border-color-hover: transparent,
    $v-bg-color-hover: var(--tertiary-hover),
    $v-text-color-hover: var(--secondary),
    $v-border-color-active: transparent
  );
}
.btn-danger {
  @include make-btn(
    $v-border-color: var(--danger),
    $v-bg-color: var(--secondary),
    $v-text-color: var(--danger),
    $v-border-color-hover: var(--danger-hover),
    $v-bg-color-hover: var(--danger-low),
    $v-text-color-hover: var(--danger-hover),
    $v-border-color-active: var(--danger-hover)
  );
}
.btn-success {
  @include make-btn(
    $v-border-color: var(--success),
    $v-bg-color: var(--secondary),
    $v-text-color: var(--success),
    $v-border-color-hover: var(--success-hover),
    $v-bg-color-hover: var(--success-low),
    $v-text-color-hover: var(--success-hover),
    $v-border-color-active: var(--success-hover)
  );
}

nav.post-controls .actions button {
  @include make-btn(
    $v-bg-color: transparent,
    $v-bg-color-hover: var(--tertiary-300),
    $v-text-color-hover: var(--tertiary)
  );
  border: none;

  .d-icon {
    color: var(--primary-700);
  }

  .discourse-no-touch &:hover,
  .discourse-no-touch &.btn-hover,
  &:focus {
    border: none;
  }

  &.delete {
    @include make-btn(
      $v-bg-color: transparent,
      $v-bg-color-hover: var(--danger-low),
      $v-text-color-hover: var(--danger-hover)
    );
  }
}

.chat-drawer-header__right-actions .btn {
  background: transparent;
}

.follow-button-container .btn,
.categories-admin-dropdown.select-kit .select-kit-header,
.user-notifications.select-kit .select-kit-header,
.pinned-options.select-kit .select-kit-header,
.notifications-button.select-kit .select-kit-header {
  border: 1px solid var(--primary-300);
}
.notifications-button.select-kit .select-kit-header .d-icon-d-watching {
  color: var(--tertiary-800);
}

.topic-admin-popup-menu .btn.btn-hover,
.topic-admin-popup-menu .btn:hover,
.topic-admin-popup-menu .btn:focus,
.post-admin-menu .btn.btn-hover,
.post-admin-menu .btn:hover,
.post-admin-menu .btn:focus {
  border: 1px solid transparent;
  background: var(--tertiary-100);
  border-radius: var(--ant-radius);
}

.btn-flat.show-replies {
  border-radius: var(--ant-radius);
}

.btn.chat-composer__send-btn {
  margin-top: 5px;
  background: var(--tertiary);
}
.btn.chat-composer__send-btn:hover {
  background: var(--tertiary-hover) !important;
}
.btn.chat-composer__send-btn * {
  color: var(--secondary);
}

.composer-controls .btn,
.discourse-no-touch .composer-controls .btn:hover,
.discourse-no-touch .composer-controls .btn.btn-hover,
.discourse-no-touch .composer-controls .btn:focus {
  background-color: transparent;
}

.fk-d-menu {
  .btn.btn-icon-text {
    border: none !important;
  }
  .dropdown-menu__item {
    @include transition-300();
    &:hover {
      background-color: var(--tertiary-300);
      &.topic-admin-delete {
        background-color: var(--danger-low);
      }
    }
  }
}

.more-topics__container {
  .btn {
    border: none !important;
  }
}

/* select-kit combox */

.select-kit.single-select.dropdown-select-box.is-expanded
  .select-kit-collection,
.select-kit.single-select.dropdown-select-box.is-expanded .select-kit-body {
  box-shadow: var(--menu-box-shadow);
  border-radius: var(--ant-radius);
}

.select-kit .select-kit-header:not(.btn),
.list-controls .combo-box .combo-box-header {
  border: 1px solid var(--primary-300);
  border-radius: 6px;
  transition: all 0.3s;
}

@media (min-width: 1000px) {
  .select-kit .select-kit-header:not(.btn),
  .list-controls .combo-box .combo-box-header {
    min-width: 120px;
  }
  .sidebar-wrapper .select-kit .select-kit-header:not(.btn),
  .sidebar-wrapper .list-controls .combo-box .combo-box-header {
    min-width: unset;
  }
  .sidebar-section-form-modal .select-kit .select-kit-header:not(.btn),
  .sidebar-section-form-modal .list-controls .combo-box .combo-box-header {
    min-width: unset;
  }
}

.select-kit .d-icon,
.select-kit .select-kit-header .caret-icon {
  color: var(--primary-low-mid);
}

.select-kit .select-kit-header:not(.btn):hover,
.list-controls .combo-box .combo-box-header:hover {
  border: 1px solid var(--tertiary-800);
  color: var(--tertiary);
}

.select-kit.multi-select.is-expanded .multi-select-header,
.select-kit.multi-select .multi-select-header:focus,
.select-kit.single-select.is-expanded .select-kit-header:not(.btn),
.select-kit.single-select .select-kit-header:not(.btn):focus,
.select-kit.single-select .select-kit-header:not(.btn):active {
  border: 1px solid var(--tertiary-800);
  outline: none;
}

.select-kit.multi-select.is-expanded .multi-select-header,
.select-kit.single-select.is-expanded .select-kit-header:not(.btn) {
  color: var(--primary-low-mid);
}

.select-kit.single-select .select-kit-header .badge-wrapper {
  transition: all 0.3s;
}
.select-kit.single-select.is-expanded .select-kit-header .badge-wrapper {
  opacity: 0.5;
}
@keyframes selectkit-drop-down {
  0% {
    margin-top: -50px;
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.select-kit.is-expanded .select-kit-body {
  border-radius: var(--ant-radius);
  box-shadow: var(--menu-box-shadow);
  animation: 0.3s selectkit-drop-down;
}
.select-kit.single-select.dropdown-select-box.is-expanded
  .select-kit-collection,
.select-kit.single-select.dropdown-select-box.is-expanded .select-kit-body {
  animation: 0.3s selectkit-drop-down;
}

/* Text input */

textarea:focus,
.search-menu .search-input:focus-within,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus {
  outline: none;
}
textarea,
.search-menu .search-input,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"] {
  border: 1px solid var(--primary-300);
  transition: all 0.3s;
  border-radius: var(--d-input-border-radius);
}
.discourse-no-touch textarea:hover,
.search-menu .search-input:hover,
input:hover,
.discourse-no-touch .d-editor-textarea-wrapper:hover {
  border: 1px solid var(--tertiary-800);
  transition: all 0.3s;
}

.discourse-no-touch .d-editor-textarea-wrapper textarea:hover {
  border: none !important;
}

.search-menu .search-input {
  border: 1px solid var(--primary-300);
  border-radius: var(--d-input-border-radius);
}

/* Navigation */

html.mobile-view #navigation-bar.nav-pills>li button{
  border: none;
  box-shadow: none;
  border-radius: none;
}

.nav-pills {
  box-shadow: 0 3px 0 var(--primary-50);
  li {
    margin-bottom: 0;
    a,
    button {
      transition: all 0.3s;
      border-radius: 0;
      &::after {
        display: none;
      }
      &.active {
        background-color: transparent;
        box-shadow: 0 3px 0 var(--d-nav-color--active);
      }
      &:not(.active):hover {
        color: var(--primary);
        background-color: transparent;
        box-shadow: 0 3px 0 var(--d-nav-color--active);
      }
    }
  }
}
.admin-controls,
.admin-controls nav {
  background-color: transparent;
}
.admin-controls nav:before,
.admin-controls nav:after {
  display: none;
}

.admin-controls .nav-pills > li a.active {
  background: transparent;
}
.admin-controls .nav-pills > li > a:not(.active):hover,
.admin-controls .nav-pills > li button:not(.active):hover {
  color: var(--quaternary);
  background-color: transparent;
  box-shadow: none;
}

.new-user-wrapper .user-navigation .nav-pills li a {
  transition: all 0.3s;
}

.nav-pills > li button {
  border: 1px solid var(--btn-default-border);
  box-shadow: var(--btn-box-shadow);
  border-radius: var(--d-button-border-radius);
  margin-left: 10px;
}
.admin-controls .nav-pills > li button:not(.active):hover,
.nav-pills > li button:hover {
  color: var(--tertiary-800);
}

.admin-controls .admin-actions {
  width: 100%;
  justify-content: right;
}

@media (max-width: 500px) {
  .desktop-view #navigation-bar {
    flex-wrap: nowrap;
    width: 100%;
    order: -1;
  }
  .desktop-view #navigation-bar.nav-pills li {
    width: 100%;
  }
  .desktop-view #navigation-bar.nav-pills li a {
    width: 100%;
    justify-content: center;
  }
}

/* content */
.boxed.admin-content {
  border: 1px solid var(--primary-low);
  padding: 10px;
  border-radius: var(--ant-radius);
}
.new-user-wrapper {
  border: 1px solid var(--primary-low);
  padding: 10px;
  border-radius: var(--ant-radius);
  margin-top: 15px;
  width: calc(100% - 21px);
  background: var(--secondary);
}

.user-main .about.has-background,
.user-main .about.no-background {
  border: 1px solid var(--primary-low);
  border-radius: var(--ant-radius);
  margin-top: 15px;
  overflow: hidden;
  width: calc(100% - 2px);
}
.user-main .about.no-background .details,
.user-main .about.has-background .details {
  padding: 10px 10px;
  border: none;
}

/* Alert */
.alert.alert-info {
  border-radius: var(--ant-radius);
  border: 1px solid var(--tertiary-800);
  background-color: var(--tertiary-50);
}

.alert.alert-info .btn-flat.close .d-icon {
  color: var(--primary-low-mid);
  transform: scale(0.7);
}
.discourse-no-touch .alert.alert-info .btn-flat.close:hover .d-icon,
.discourse-no-touch .alert.alert-info .btn-flat.close.btn-hover .d-icon {
  color: var(--primary-high);
}

.modal .modal-body .warning {
  border: 1px solid var(--danger);
  padding: 5px 10px;
  border-radius: var(--ant-radius);
  background: var(--danger-low);
}
.alert.alert-warning {
  border: 1px solid var(--highlight-high);
  border-radius: var(--ant-radius);
}

body.has-full-page-chat .alert-error,
body.has-full-page-chat .alert-info,
body.has-full-page-chat .alert-success,
body.has-full-page-chat .alert-warning {
  margin: 10px 0 1px 0;
  border-bottom: unset;
}
body.has-full-page-chat .alert-info {
  border: 1px solid var(--tertiary-800);
}

/* chat */
.btn.no-text.btn-flat.chat-scroll-to-bottom__button {
  background: transparent;
  .d-icon {
    color: var(--secondary) !important;
  }
}

.desktop-view.has-full-page-chat:not(.discourse-sidebar) #main-outlet {
  margin-left: 10px;
}
.desktop-view.has-full-page-chat:not(.discourse-sidebar) .full-page-chat {
  border: 1px solid var(--primary-low);
  border-radius: var(--ant-radius);
}
.d-header .chat-channel-unread-indicator {
  scale: 0.7;
  transform: translate(-5px, 26px);
}
.full-page-chat .chat-full-page-header {
  border-top: none;
  border-radius: var(--ant-radius);
}

.chat-composer__inner-container {
  border: none;
}
.chat-composer__input-container textarea {
  border: 1px solid var(--primary-300);
  margin-right: 5px;
  margin-top: 6px;
  min-height: 35px;
  line-height: 1.6em;
}
.chat-composer-dropdown__trigger-btn.btn {
  margin: 7px 3px 0 0;
}

/* popup menu */

.popup-menu {
  border-radius: var(--ant-radius);
  box-shadow: var(--menu-box-shadow);
}

.menu-panel,
.chat-drawer {
  border-radius: var(--ant-radius);
  box-shadow: var(--menu-box-shadow);
}

/*   Modal   */
.modal .modal-inner-container {
  border-radius: var(--ant-radius);
}
.modal-footer {
  justify-content: flex-end;
  padding: 14px 1px 10px 15px;
}
.modal-header h3 {
  font-size: var(--font-up-2);
}

.discard-draft-modal .btn.save-draft {
  order: -3;
  border: 1px solid transparent;
  color: var(--secondary);
  background: var(--tertiary);
  box-shadow: var(--btn-box-shadow);
}
.discard-draft-modal .btn.save-draft:hover {
  background: var(--tertiary-hover);
}
.discard-draft-modal .btn.keep-editing {
  order: -2;
  border: 1px solid;
  box-shadow: var(--btn-box-shadow);
}
.discard-draft-modal .btn.discard-draft {
  order: -1;
}

nav.post-controls .actions button {
  border-radius: var(--ant-radius);
}

nav.post-controls .actions .double-button button {
  border-radius: 0;
}
nav.post-controls .actions .double-button button:first-child {
  border-top-left-radius: var(--ant-radius);
  border-bottom-left-radius: var(--ant-radius);
}
nav.post-controls .actions .double-button button:last-child {
  border-top-right-radius: var(--ant-radius);
  border-bottom-right-radius: var(--ant-radius);
}

nav.post-controls .actions > button.edit:last-child,
nav.post-controls .actions > button.reply:last-child {
  border: 1px solid var(--tertiary-800);
  background: var(--seecondary);
  box-shadow: var(--btn-box-shadow);
  opacity: 1;
  transition: all 0.3s;
}
nav.post-controls .actions > button.edit:last-child:hover,
nav.post-controls .actions > button.reply:last-child:hover {
  background: var(--tertiary-hover);
  border: 1px solid var(--tertiary);
}
nav.post-controls .actions > button.edit:last-child:active,
nav.post-controls .actions > button.reply:last-child:active {
  scale: 0.95;
}
nav.post-controls .actions > button.edit:last-child *,
nav.post-controls .actions > button.reply:last-child * {
  color: var(--tertiary-800);
  font-size: 90%;
  transition: all 0.3s;
}
nav.post-controls .actions > button.edit:last-child:hover *,
nav.post-controls .actions > button.reply:last-child:hover * {
  color: var(--secondary);
}

.discourse-no-touch
  .discourse-reactions-actions:not(.has-reacted):not(.my-post)
  .discourse-reactions-double-button:hover,
.discourse-no-touch
  .discourse-reactions-actions:not(.has-reacted):not(.my-post)
  .discourse-reactions-reaction-button:hover
  .reaction-button {
  border-radius: var(--ant-radius);
}

/* header */
.drop-down-mode .d-header-icons .active .icon {
  border: 1px solid transparent;
  border-radius: 100%;
  background: rgba(var(--tertiary-rgb), 0.2);
}
.drop-down-mode .d-header-icons .active .icon > .d-icon {
  color: var(--header_primary);
}
.drop-down-mode .d-header-icons .active .icon:after {
  display: none;
}
.discourse-no-touch .drop-down-mode .d-header-icons .active .icon:hover {
  background: rgba(var(--tertiary-rgb), 0.2);
}
.discourse-no-touch .d-header-icons .icon:hover,
.discourse-no-touch .d-header-icons .icon:focus {
  border-radius: 100%;
  background: transparent;
}

@keyframes panel-drop-down {
  0% {
    transform: translateY(-50px);
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}
@keyframes panel-drop-up {
  0% {
    transform: translateY(50px);
    opacity: 0;
  }
  100% {
    transform: translateY(0px);
    opacity: 1;
  }
}
.menu-panel.drop-down {
  margin-top: 3px;
  animation: 0.3s panel-drop-down;
}
.chat-drawer.is-expanded {
  animation: 0.3s panel-drop-up;
}
.chat-drawer:not(.is-expanded) {
  animation: 0.3s panel-drop-down;
}

.d-header-icons .icon > .d-icon,
.d-header-icons .icon > .d-icon {
  color: var(--header_primary-very-high);
  scale: 0.7;
}
.discourse-no-touch .d-header-icons .icon:hover > .d-icon,
.discourse-no-touch .d-header-icons .icon:focus > .d-icon {
  color: var(--header_primary);
}

.user-menu.revamped .tabs-list .btn {
  border-radius: 0;
}
.user-menu.revamped .tabs-list .btn.active {
  background: var(--tertiary-300);
}
.user-menu.revamped .tabs-list .btn:active {
  scale: 1;
  border: none;
}
.d-header {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}
.btn.btn-sidebar-toggle:active {
  border: none;
}

/*   Sidebar   */

.sidebar-wrapper {
  background-color: var(--secondary);
}
.has-sidebar-page .sidebar-wrapper {
  border-right: 1px solid var(--primary-low);
}

.sidebar-more-section-links-details-summary,
.sidebar-more-section-links-details,
.sidebar-section-link-wrapper .sidebar-section-link {
  transition: all 0.5s;
  margin: 1px 10px 1px 10px;
  border-radius: 6px;
}
.sidebar-section-link-wrapper .sidebar-section-link.active {
  background: var(--tertiary-100);
  color: var(--tertiary-hover);
}
.sidebar-section-link-wrapper .sidebar-section-link.active .d-icon {
  color: var(--tertiary-hover);
}

.sidebar-section-wrapper .sidebar-section-header-wrapper {
  transition: all 0.5s;
  margin: 1px 10px 1px 10px;
  /*         border-bottom: 1px solid var(--primary-low); */
  color: var(--primary-low);
}
.discourse-no-touch
  .sidebar-section-wrapper
  .sidebar-section-header-wrapper:hover {
  background: transparent;
}

/* 细节 */
#create-topic.btn-default {
  background: var(--tertiary);
  border: 1px solid transparent;
}
#create-topic.btn-default * {
  color: var(--secondary);
}
#create-topic.btn-default:hover {
  background: var(--tertiary-hover);
}
.mobile-view .group-details-after-outlet.invite {
  margin-top: 8px;
}
@media (max-width: 780px) {
  .modal-footer {
    padding: 14px 15px 10px 15px;
  }
  .mobile-view .user-main .about .controls ul li {
    flex: unset;
    width: max-content;
  }
  .user-main .navigation-controls .new-private-message.btn,
  .mobile-view .user-main .details .btn-primary.compose-pm,
  .container.group .group-details-button .group-message-button.btn-primary,
  #create-topic.btn-default {
    position: fixed;
    border-radius: 100%;
    border: none;
    width: 60px;
    height: 60px;
    right: 20px;
    bottom: 30px;
    z-index: 99;
    box-shadow: var(--float-btn-shadow);
    transition: all 0.5s ease;
    margin: 0;
  }
  .nav-controls-hidden .user-main .navigation-controls .new-private-message.btn,
  .mobile-view .nav-controls-hidden .user-main .details .btn-primary.compose-pm,
  .nav-controls-hidden
    .container.group
    .group-details-button
    .group-message-button.btn-primary,
  .nav-controls-hidden #create-topic.btn-default {
    right: -90px;
  }
  .user-main .navigation-controls .new-private-message.btn .d-button-label,
  .mobile-view .user-main .details .btn-primary.compose-pm .d-button-label,
  .container.group
    .group-details-button
    .group-message-button.btn-primary
    .d-button-label,
  #create-topic.btn-default .d-button-label {
    display: none;
  }
  .user-main .navigation-controls .new-private-message.btn .d-icon,
  .mobile-view .user-main .details .btn-primary.compose-pm .d-icon,
  .container.group
    .group-details-button
    .group-message-button.btn-primary
    .d-icon,
  #create-topic.btn-default .d-icon {
    margin: 0;
    font-size: 140%;
  }
}

.directory-table {
  width: 99%;
}

.admin-controls .controls {
  background: transparent;
}
.admin-detail {
  border: none;
}

.topic-map {
  border-radius: var(--ant-radius);
  border-top: 1px solid var(--primary-low);
}
.topic-map section:first-child {
  border-radius: var(--ant-radius);
  border-top: none;
}
.topic-map .map .btn.btn-icon {
  border: none;
}

.discourse-no-touch
  .discourse-reactions-actions:not(.has-reacted).my-post
  .discourse-reactions-double-button:hover {
  border-radius: var(--ant-radius);
}
.discourse-reactions-counter {
  height: 30px;
}

#topic-progress-wrapper .topic-OP-admin-menu-button {
  margin: 0 10px;
}
.timeline-open-jump-to-post-prompt-btn.btn {
  border: 1px solid var(--tertiary);
  background: var(--tertiary);
  margin-right: 10px;
}
.timeline-open-jump-to-post-prompt-btn.btn:hover {
  background: var(--tertiary-hover);
}
.timeline-open-jump-to-post-prompt-btn.btn * {
  color: var(--secondary);
}
#topic-progress-wrapper .btn.toggle-admin-menu {
  box-shadow: var(--float-btn-shadow);
}
#topic-progress {
  border-radius: var(--ant-radius);
  overflow: hidden;
  box-shadow: var(--float-btn-shadow);
  border-color: var(--tertiary-500);
}

#topic-progress-wrapper.docked {
  margin-top: 10px;
}
#topic-progress-wrapper.docked .btn.toggle-admin-menu,
#topic-progress-wrapper.docked #topic-progress {
  box-shadow: none;
}

/* Post stream */

.embedded-posts {
  border-radius: var(--ant-radius);
}
.embedded-posts.bottom {
  animation: 0.3s panel-drop-down;
}
.embedded-posts.top {
  animation: 0.3s panel-drop-up;
}

/*   Users   */

/* Category */
.category-list-item.category {
  border-radius: var(--ant-radius);
  border-right: 1px solid var(--primary-low) !important;
}
.category-boxes .category-box,
.category-boxes-with-topics .category-box {
  border-radius: var(--ant-radius);
  box-shadow: var(--small-shadow);
}
.category-boxes .category-box-inner,
.category-boxes-with-topics .category-box-inner {
  border: 1px solid var(--primary-low);
  border-radius: 0 var(--ant-radius) var(--ant-radius) 0;
}

div.edit-category .edit-category-title-bar {
  border: 1px solid var(--primary-low);
  border-radius: var(--ant-radius);
}

/* Group */
.groups-boxes .group-box {
  border-radius: var(--ant-radius);
}
.group-details-container {
  border-radius: var(--ant-radius);
  border: 1px solid var(--primary-low);
  box-shadow: var(--small-shadow);
}
.nav-stacked,
div.edit-category .edit-category-nav .nav-stacked,
.user-secondary-navigation .nav-stacked {
  border-radius: var(--ant-radius);
  background: var(--primary-very-low);
  padding: 10px;
  border: 1px solid var(--primary-low);
}
.nav-stacked li {
  border: none;
}
.nav-stacked li a,
.user-secondary-navigation .nav-stacked li a {
  margin-bottom: 5px;
  border-radius: var(--ant-radius);
  transition: all 0.3s;
}
.nav-stacked li a.active,
.user-secondary-navigation .nav-stacked li a.active {
  background: var(--tertiary-100);
  border-radius: var(--ant-radius);
  color: var(--tertiary);
}
.nav-stacked li a:not(.active):hover,
.user-secondary-navigation .nav-stacked li a:not(.active):hover {
  background: var(--primary-low);
  border-radius: var(--ant-radius);
}

/* Mobile view */
.mobile-view #navigation-bar.nav-pills {
  box-shadow: none;
}
.mobile-view #navigation-bar.nav-pills li {
  border: none;
}
.mobile-view #navigation-bar.nav-pills a.toggle-link {
  min-width: 100px;
  border: none;
  box-shadow: 0 3px 0 var(--quaternary);
  justify-content: center;
}
.mobile-view .list-controls .nav-pills .drop {
  margin-top: 10px;
  border: none;
  box-shadow: var(--menu-box-shadow);
  border-radius: var(--ant-radius);
  justify-content: center;
  animation: 0.3s panel-drop-down;
}
.list-controls .nav-pills .drop li a {
  padding-left: 10px;
  margin: 10px;
  color: var(--primary);
}

/*   uod   */
.popup-tip.bad {
  border-radius: var(--ant-radius);
  border: 1px solid var(--tertiary);
}

.user-card,
.group-card,
.user-card .card-content,
.group-card .card-content {
  border-radius: var(--ant-radius);
  outline: none;
}

.top-sub-section li {
  border: none;
}

.badge-card {
  border-radius: var(--ant-radius);
}

.user-menu.revamped .quick-access-panel li {
  transition: all 0.3s;
}

.user-menu.revamped .quick-access-panel li .btn {
  border-color: transparent !important;
}

.more-buttons.select-kit.single-select.dropdown-select-box.is-expanded
  .select-kit-collection {
  box-shadow: none;
}

.header-dropdown-toggle.chat-header-icon .icon.active {
  border-radius: 100%;
  background: rgba(var(--tertiary-rgb), 0.2);
  border: none;
}

.mobile-nav .drop.expanded {
  box-shadow: var(--menu-box-shadow);
  border-radius: var(--ant-radius);
  animation: 0.3s panel-drop-down;
}

.mobile-nav > li > a.expander {
  border: 1px solid var(--primary-300);
  border-radius: 6px;
  transition: all 0.3s;
}

.dialog-content {
  border-radius: var(--ant-radius);
}
.btn-reply-here {
  border: 1px solid var(--primary-400);
}
.btn-reply-here * {
  transition: all 0.3s;
}
.btn-reply-here:hover * {
  color: var(--tertiary-800) !important;
}
.reply-where-modal .btn.btn-reply-where__cancel:hover {
  background: transparent;
}

.sidebar-footer-wrapper .sidebar-footer-container {
  background: var(--secondary);
  border: none;
}
.sidebar-wrapper .sidebar-sections {
  --scrollbarThumbBg: var(--tertiary-200);
}

.sidebar-footer-wrapper .sidebar-footer-container:before {
  background: linear-gradient(
    to bottom,
    rgba(var(--secondary-rgb), 0),
    rgba(var(--secondary-rgb), 1)
  );
}

.btn.btn-danger.btn-icon:not(:hover) {
  background: var(--secondary);
  border: 1px solid var(--danger);
}
.btn.btn-danger.btn-icon:not(:hover) * {
  color: var(--danger);
}

.emoji-picker {
  border-radius: var(--ant-radius);
  box-shadow: var(--menu-box-shadow);
}

.discourse-no-touch .btn-flat:hover .badge-notification .d-icon,
.discourse-no-touch .btn-flat.btn-hover .badge-notification .d-icon {
  color: var(--secondary);
}

.chat-emoji-picker__filter.dc-filter-input-container {
  border-radius: var(--ant-radius);
  background: var(--secondary);
  border: 1px solid var(--primary-300);
  transition: all 0.3s;
}
.chat-emoji-picker__filter.dc-filter-input-container:hover,
.chat-emoji-picker__filter.dc-filter-input-container:focus {
  border: 1px solid var(--tertiary-800);
}

/*  Upd at 2023/4/30 */

.mobile-view .full-width #list-area .topic-list .topic-list-body {
  border-top: none;
}

.mobile-view .list-controls .nav-pills > li a:not(.active) {
  box-shadow: 0 3px 0 var(--primary-low);
}
.mobile-view .list-controls #navigation-bar.nav-pills {
  flex-wrap: nowrap;
  > li,
  > li a {
    justify-content: center;
    min-width: max-content;
    // width: 100%;
    border-radius: 0;
  }
}

@media (max-width: 780px) {
  .mobile-view .list-controls .navigation-controls {
    position: fixed;
    /*         border: 2px solid; */
    width: 40px;
    right: 27px;
    bottom: 90px;
    z-index: 99;
    transition: all 0.5s ease;
  }
  .mobile-view .list-controls .navigation-controls > .btn,
  .mobile-view
    .list-controls
    .navigation-controls
    > .notifications-button.select-kit
    .select-kit-header {
    border-radius: 100%;
    border: 1px solid var(--primary-300);
    color: var(--secondary);
    box-shadow: var(--float-btn-shadow);
  }
  .mobile-view .list-controls .navigation-controls > .btn .d-icon,
  .mobile-view
    .list-controls
    .navigation-controls
    > .notifications-button.select-kit
    .select-kit-header
    .d-icon {
    color: var(--primary-high);
  }
  .mobile-view
    .list-controls
    .navigation-controls
    > .notifications-button.select-kit
    .select-kit-header
    .d-icon.d-icon-d-watching {
    color: var(--tertiary);
  }
  .mobile-view .list-controls .navigation-controls > .btn:hover,
  .mobile-view
    .list-controls
    .navigation-controls
    > .notifications-button.select-kit
    .select-kit-header:hover {
    border: 1px solid var(--tertiary-800);
  }
  .mobile-view .nav-controls-hidden .list-controls .navigation-controls {
    right: -80px;
  }
}

.mobile-view
  .list-controls
  .navigation-controls
  > .categories-admin-dropdown.select-kit
  .select-kit-header {
  border-radius: 800px;
  border: 1px solid var(--primary-300);
  color: var(--secondary);
  box-shadow: var(--float-btn-shadow);
  margin-left: -10px;
}
.mobile-view
  .list-controls
  .navigation-controls
  > .categories-admin-dropdown.select-kit.is-expanded
  .select-kit-header {
  border: 1px solid var(--tertiary-800);
}

aside.onebox {
  border-radius: var(--ant-radius);
  border: 1px solid var(--primary-low);
  background: var(--primary-very-low);
}

.mobile-view .discourse-reactions-counter {
  height: 37px;
}
.mobile-view .discourse-reactions-actions .reactions-counter {
  padding-top: 0;
}

/* new chat composer */
.chat-composer__inner-container textarea {
  border: 1px solid transparent !important;
}

.chat-composer .chat-composer__send-btn .d-icon {
  transition: all 0.3s;
}

.chat-composer.is-send-enabled .chat-composer__send-btn:focus {
  outline: unset;
  box-shadow: inset 0 0 3px var(--tertiary);
  border-radius: 0 10px 10px 0;
}

.chat-message
  .chat-message-avatar
  .chat-user-avatar
  .chat-user-avatar-container
  .avatar,
.chat-message .chat-emoji-avatar .chat-emoji-avatar-container {
  width: 32px;
  height: 32px;
}

.chat-composer.is-focused .chat-composer__inner-container {
  box-shadow: 0 0 4px 1px var(--tertiary-low);
}

.chat-composer-dropdown__action-btn.btn {
  justify-content: start;
}

.tippy-box[data-theme="user-tips"] .btn-flat,
.tippy-box[data-theme="user-tips"] .json-editor-btn-collapse {
  background: transparent !important;
  color: var(--secondary) !important;
}

.tippy-box[data-theme="user-tips"] .btn-primary {
  background: var(--secondary) !important;
  color: var(--tertiary) !important;
}

html.mobile-view {
  .user-main .details .controls ul {
    flex-direction: row;
    li {
      margin: 0 5px 0 5px;
    }
  }
}